import request from '@/utils/request'

// 查询评试对象列表
export function listTarget(query) {
  return request({
    url: '/evalution/target/list',
    method: 'get',
    params: query
  })
}
// 查询当前用户的述职历史
export function listReport(query) {
  return request({
    url: '/evalution/target/reportlist',
    method: 'get',
    params: query
  })
}

//查询当前打分
export function markscorelist(query) {
  return request({
    url: '/evalution/target/markscorelist',
    method: 'get',
    params: query
  })
}

// 查询评试对象详细
export function getTarget(participatorId) {
  return request({
    url: '/evalution/target/' + participatorId,
    method: 'get'
  })
}

//score
export function getTargetScore(participatorId) {
  return request({
    url: '/evalution/target/score/' + participatorId,
    method: 'get'
  })
}
// 新增评试对象
export function addTarget(data) {
  return request({
    url: '/evalution/target',
    method: 'post',
    data: data
  })
}

// 修改评试对象
export function updateTarget(data) {
  return request({
    url: '/evalution/target',
    method: 'put',
    data: data
  })
}
export function scoreTarget(data) {
  return request({
    url: '/evalution/target/score',
    method: 'put',
    data: data
  })
}

// 删除评试对象
export function delTarget(participatorId) {
  return request({
    url: '/evalution/target/' + participatorId,
    method: 'delete'
  })
}

// 导出评试对象
export function exportTarget(query) {
  return request({
    url: '/evalution/target/export',
    method: 'get',
    params: query
  })
}
